
<!-- Navbar  ================================================== -->
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="{{ site.baseurl }}/README.html"><i class="glyphicon glyphicon-info-sign"></i></a>
    </div>
    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
        <ul class="nav navbar-nav">
         {% for item in site.navigation %}
            {% assign class = nil %}
            {% if page.url contains item.url and item.url != '/' %}
                {% assign class = 'active' %}
            {% endif %}
            {% if page.url == '/' and item.url == '/' %}
                {% assign class = 'active' %}
            {% endif %}
            {% if item.url contains 'http://' or item.url contains 'https://' %}
              <li class="{{ class }}"><a href="{{ item.url }}">{{ item.text }}</a></li>
            {% else %}
              <li class="{{ class }}"><a href="{{ site.baseurl }}{{ item.url }}">{{ item.text }}</a></li>
            {% endif %}
         {% endfor %}
        </ul>
      <!-- Search site using DuckDuckGo's index -->
        <form class="navbar-form navbar-right" role="search" method="get" action="//duckduckgo.com/">
          <div class="form-group">
            <input type="hidden" name="sites" value="{{site.url}}" />
            <input type="hidden" value="1" name="kh"></input> <!-- To turn on https -->
            <input type="hidden" value="1" name="kn"></input> <!-- To open up a new window -->
            <input type="hidden" value="1" name="kac"></input> <!-- To turn on auto-suggestion -->
            <input type="hidden" value="e" name="ky"></input> <!-- Color of highlights. or write out the color code you want, e.g. %23395323 (%23 is an encoded # char). -->
            <input type="text" class="form-control search-query" type="search" name="q" placeholder="Search this site"/>
          </div>
          <button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
       </form>

    </div><!--/.nav-collapse -->
  </div> <!-- /container -->
</nav>
